package test;

import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 东莞呵呵
 * Date:2022-07-24
 * Time:21:10
 */
public class Main {
    public static void main(String[] args) {
        ISort[] iSorts= {
                new InsertSort(),
                new ShellSort(),
                new SelectSort(),
                new HeapSort()};
        for (int i = 0; i < iSorts.length; i++) {
            int[] array={47,56,24,265,1,46,4,5,37,98,45};
            sort(array,iSorts[i]);
        }

    }
    public static void sort(int[] array,ISort iSort){
        iSort.sort(array);
        System.out.println(Arrays.toString(array));
    }
}
